<div style="padding-left: 15px;" id="new_client_link">
  <a href="#" id="add_client_link" onclick="Element.hide('new_client_link'); Element.show('new_client_div'); $('client_name').focus(); return false;" >New Client</a>
</div>

<div id="new_client_div" style="display:none;">
  <%= form_tag :controller => 'clients', :action => 'create' %>

  <%= error_messages_for 'client' %>

  <!--[form:client]-->
  <input type="hidden" name="return_to" value="<%= url_for({}) %>" id="return_to" />
  <!-- FIXME better display -->
  <%if @client.owner.id != session[:user_id]-%>
  <p><label for="worklog_worker_id">Owner</label><br/>
  <%= @client.owner.short %></p>
  <%end-%>
  <%= hidden_field 'client', 'owner_id' %></p>
  
  <p><label for="client_name">Name</label><br/>
  <%= text_field 'client', 'name'  %></p>
  
  <p><label for="client_short">Short</label><br/>
  <%= text_field 'client', 'short'  %></p>
  
  <p><label for="client_url">Url</label><br/>
  <%= text_field 'client', 'url'  %></p>

  <%= submit_tag "Create client" %> <a class="admin" href="#" onclick="Element.hide('new_client_div'); Element.show('new_client_link'); return false;">Cancel</a>
  <!--[eoform:client]-->
  </form>

</div>
